import { NavigationActions } from 'react-navigation'

export default class NavigatorUtil {
  /**
   * 返回上一页
   * @param navigation
   */
  static goBack(navigation) {
    navigation.goBack();
  }

  /**
   * 跳转到男孩页
   */
  static goToBoy(params) {
    const { navigation } = params;
    navigation.navigate("Boy", {
      navigation,
    })
  }

  /**
   * 跳转到女孩页
   */
  static goToGirl(params) {
    const { navigation, word, success } = params;
    navigation.navigate("Girl", {
      navigation,
      word,
      success,
    })
  }

}
